/**
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.home-margin {
  margin: 2rem 1rem 10rem 1rem;
}

.video-container {
  height: 15vh;
  overflow: hidden;
  display: block;
  position: relative;
  border-radius: 1rem;

  video {
    margin-top: -15%;
  }
}

.control-options mat-icon {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  transform: scale(1.5);
}

.drop-zone {
  border: 2px dashed #666;
  border-radius: 8px;
  padding: 0.5rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    border-color 0.3s,
    background-color 0.3s;
  background-color: #333;

  &:hover {
    border-color: #007bff;
    background-color: #444;
  }

  img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
  }

  &.disabled {
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
}

.drop-zone-limit-reached {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}

.drop-zone-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.image-preview-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  .clear-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    z-index: 10;
  }
}

.menu-item-selected {
  background: linear-gradient(to right, #3b82f6, #8b5cf6, #f87171);
}

.reference-previews-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  height: 100%;
}

.image-preview-container.small {
  width: 72px;
  height: 72px;

  .clear-button.small {
    // Adjust size and position for the smaller container
    width: 24px;
    height: 24px;
    top: -8px;
    right: -8px;

    .mat-icon {
      font-size: 16px;
      width: 16px;
      height: 16px;
    }
  }
}

.global-reference-toggle {
  // Remove positioning to place it in the normal layout flow
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) {
}

// Medium devices (tablets, 768px and up)
@media (min-width: 768px) {
  .video-container {
    height: 45vh;
  }
}

// Large devices (desktops, 992px and up)
@media (min-width: 992px) {
}

// X-Large devices (large desktops, 1200px and up)
@media (min-width: 1200px) {
  .home-margin {
    margin: 2rem auto 0 auto;
  }

  ::ng-deep .image-selector-dialog {
    width: 70vw !important;
    max-width: 70vw !important;
  }
}

// XX-Large devices (larger desktops, 1400px and up)
@media (min-width: 1400px) {
}

// 4K Displays (Ultra HD) (Projectors or Higher Resolution Screens, 2160px and up)
@media screen and (min-width: 2160px) {
  .video-container {
    video {
      margin-top: -10%;
    }
  }
}
